//
//  XYEnum.m
//  PeiZhuShou
//
//  Created by 找汽配 on 2016/10/17.
//  Copyright © 2016年 XiangYun. All rights reserved.
//

#import "XYEnum.h"

@implementation XYEnum

#pragma mark - Error Code

+ (NSString *)descriptionWithErrorCode:(ErrorCode)code {
    if (code == ErrorCodeNone) {
        return nil;
    }
    if (code == ErrorCodeErrToken) {
        return @"Token错误";
    }
    if (code == ErrorCodeThirdpartyLoginUnbinded) {
        return @"第三方登录未绑定账号";
    }
    if (code == ErrorCodeInvalid) {
        return @"您的登录已过期，请重新登录";
    }
    if (code == ErrorCodeErrMobile) {
        return @"错误的手机号码";
    }
    if (code == ErrorCodeErrUsername) {
        return @"该用户名不存在";
    }
    if (code == ErrorCodeMobile) {
        return @"该手机号码未注册";
    }
    if (code == ErrorCodeErrPassword) {
        return @"密码错误";
    }
    if (code == ErrorCodeErrImageCaptcha) {
        return @"图片验证码错误";
    }
    if (code == ErrorCodeErrMobileCaptcha) {
        return @"短信校验码错误";
    }
    if (code == ErrorCodeCaptchaExpire) {
        return @"短信校验码已过期";
    }
    if (code == ErrorCodeErrPasswordIn) {
        return @"您输入的密码格式错误，请重新输入";
    }
    if (code == ErrorCodeUsernameExist) {
        return @"该用户名已被注册";
    }
    if (code == ErrorCodeMobileExist) {
        return @"该手机号码已被注册";
    }
    return nil;
}

@end
